<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vue Basics</title>
    <link
      href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
      rel="stylesheet"
    />
    <link rel="stylesheet" href="styles.css" />
    <script
      src="https://cdn.jsdelivr.net/npm/vue@3.3.13/dist/vue.global.min.js"
      defer
    ></script>
    <script src="app.js" defer></script>
  </head>

  <body>
    <header>
      <h1>Vue Events</h1>
    </header>

    <section id="events">
      <h2>Events in Action</h2>
      <button @click="add">Add</button>
      <button @click.right="reduce">remove</button>
      <p v-once>Starting Counter: {{ counter }}</p>
      <p>Result: {{ counter }}</p>
      <input type="text" v-model="name" />
      <input type="text" v-model="lastname" />
      <button @click="resetInput">Reset Input</button>
      <p>Your Name: {{ fullname }}</p>
      <form @submit.prevent="submitForm">
        <input type="text" />
        <button>Sign Up</button>
      </form>
    </section>
  </body>
</html>

<!--  
v-model="name" je shortcut za ovo dvoje
:value="name"
@input="setName($event, 'Scott')"
-->
<!-- 
v-model je shortcut za v-bind:value i v-on:input
 -->
